﻿using CommunityToolkit.Mvvm.ComponentModel;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Wpf.Ui.Appearance;

namespace MetaView.Shell.Models.Pages;

/// <summary>
/// 设置页面模型
/// </summary>
public partial class SettingsPageModel : ObservableObject
{
    /// <summary>
    /// 主题列表
    /// </summary>
    [ObservableProperty]
    private ObservableCollection<ThemeModel> themeList;

    /// <summary>
    /// 当前选择的主题
    /// </summary>
    [ObservableProperty]
    private ThemeModel selectedTheme;

    /// <summary>
    /// 构造函数
    /// </summary>
    public SettingsPageModel()
    {
        ThemeList = new ObservableCollection<ThemeModel>
        {
            new ThemeModel { Code = "Light", Name = "浅色模式" },
            new ThemeModel { Code = "Dark",  Name = "深色模式" },
            new ThemeModel { Code = "System",  Name = "跟随系统" }
        };
    }
}

/// <summary>
/// 主题模型
/// </summary>
public class ThemeModel
{
    /// <summary>
    /// 主题编码
    /// </summary>
    public required string Code { get; set; }

    /// <summary>
    /// 主题名称
    /// </summary>
    public required string Name { get; set; }
}
